$OpenBSD: patch-modules_core_src_system_cpp,v 1.3 2017/05/06 19:42:55 espie Exp $
Fix build on i386.
--- modules/core/src/system.cpp.orig
+++ modules/core/src/system.cpp
@@ -157,7 +157,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
 
 #include <stdarg.h>
 
-#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __QNX__
+#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __QNX__ || defined __OpenBSD__
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -253,6 +253,7 @@ struct HWFeatures
             f.have[CV_CPU_AVX]    = (((cpuid_data[2] & (1<<28)) != 0)&&((cpuid_data[2] & (1<<27)) != 0));//OS uses XSAVE_XRSTORE and CPU support AVX
         }
 
+#if !defined __i386__
     #if defined _MSC_VER && (defined _M_IX86 || defined _M_X64)
         __cpuidex(cpuid_data, 7, 0);
     #elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
@@ -288,6 +289,7 @@ struct HWFeatures
         {
             f.have[CV_CPU_AVX2] = (cpuid_data[1] & (1<<5)) != 0;
         }
+#endif
 
         return f;
     }
